package com.iron.consumer.feign;


import com.iron.common.core.constant.ServiceNameConstant;
import com.iron.common.core.util.R;
import com.iron.common.feign.config.IronFeignConfiguration;
import com.iron.consumer.entity.TxB;
import com.iron.consumer.feign.fallback.IronProviderFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * iron provider feign
 *
 * @author YT
 * @date 2019-06-11
 */
@FeignClient(name = ServiceNameConstant.IRON_SFM, configuration = IronFeignConfiguration.class, fallback = IronProviderFeignFallback.class)
public interface IronProviderFeign {

    @GetMapping("/provider/test")
    R providerTest();

    @PostMapping("/txb/save")
    R save(@RequestBody TxB txB);
}
